#include "MainFrame/MenuBar/HelpMenuList.h"
#include <QEvent>

HelpMenuList::HelpMenuList(const QString &title, QWidget *parent) :
    MenuListBase(title, parent),
    m_pHelpAction(nullptr),
    m_pAboutAction(nullptr)
{
    m_pHelpAction  = addOneAction("Help", this);
    m_pAboutAction = addOneAction("About", this);

    connect(m_pHelpAction, SIGNAL(triggered()), this, SLOT(helpSlot()));
    connect(m_pAboutAction, SIGNAL(triggered()), this, SLOT(aboutSlot()));
}

HelpMenuList::~HelpMenuList()
{

}

void HelpMenuList::changeEvent(QEvent *event)
{
    QWidget::changeEvent(event);
    switch (event->type())
    {
    case QEvent::LanguageChange:
        initTrans();
        break;
    default:
        break;
    }
}

void HelpMenuList::initTrans()
{
    m_pHelpAction->setText(tr("Help"));
    m_pAboutAction->setText(tr("About"));
}

void HelpMenuList::helpSlot()
{

}

void HelpMenuList::aboutSlot()
{

}
